From: Wei Liu Date: Mon, 20 Aug 2018 08:38:18 +0000 (+0100) Subject: tools/tests: fix an xs-test.c issue X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3445 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=3a2b8525b883baa87fe89b3da58f5c09fa599b99;p=xen.git tools/tests: fix an xs-test.c issue The ret variable can be used uninitialised when iters is 0. Initialise ret at the beginning to fix this issue. Reported-by: Steven Haigh Signed-off-by: Wei Liu Acked-by: Ian Jackson --- diff --git a/tools/tests/xenstore/xs-test.c b/tools/tests/xenstore/xs-test.c index 17d4a66b85..c4c99c0661 100644 --- a/tools/tests/xenstore/xs-test.c +++ b/tools/tests/xenstore/xs-test.c @@ -66,7 +66,7 @@ static int call_test(struct test *tst, int iters, bool no_clock) char *stage = "?"; struct timespec tp1, tp2; uint64_t nsec, nsec_min, nsec_max, nsec_sum; - int i, ret; + int i, ret = 0; nsec_min = -1; nsec_max = 0;